package retrofit2.harmony.ui.slice;

import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Component;
import retrofit2.harmony.ResourceTable;

public class MainAbilitySlice extends AbilitySlice {
    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
        findComponentById(ResourceTable.Id_get_request_btn).setClickedListener(new Component.ClickedListener() {
            @Override
            public void onClick(Component component) {
                present(HomeSlice.newInstance(), intent);
            }
        });
    }
}